<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnCataLogInPost extends AbstractMigration
{

    public function up()
    {
        $this->table("post")
            ->addColumn('parent_id', 'integer', ['default' => 0, 'comment' => '父目录ID'])
            ->addColumn('level', 'integer', ['default' => 0, 'comment' => '等级'])
            ->save();
    }

    public function down()
    {
        $this->table("post")
            ->removeColumn('parent_id')
            ->removeColumn('level')
            ->save();
    }
}
